package com.sunchangming.stmdb;

import org.junit.Test;

public class IDGeneratorTest {
	private static class Type1 implements IDGenerator.IType {

		@Override
		public int getId() {
			return 0;
		}

		@Override
		public long getMaxValue() {
			return 0;
		}
	}

	private static class Type2 implements IDGenerator.IType {

		@Override
		public int getId() {
			return 1;
		}

		@Override
		public long getMaxValue() {
			return 0;
		}
	}

	@Test
	public void testGetNextValue() {
		IDGenerator.getInstance().setServerid(1);
		IDGenerator.getInstance().register(new Type1());
		IDGenerator.getInstance().register(new Type2());
	}

}
